home *** CD-ROM | disk | FTP | other *** search
/ CD Action 72 - Disc 2 / cdaction-72-2.iso / #dema / tux racer / tuxracer-win32-0.61a.exe / tuxracer-win32-0.61a / courses / common / courseinit.tcl < prev    next >
Text File  |  2000-10-30  |  3KB  |  96 lines

  1. #Course initialization script
  2. #sets basic course paramaters before the lighting is set.
  3.  
  4. set cwd [pwd]
  5. tux_goto_data_dir
  6. cd courses/common
  7.  
  8. source tree_polyhedron.tcl
  9.  
  10. tux_load_texture fish herring_standard.rgb 0
  11. tux_item_spec -name herring -diameter 1.0 -height 1.0 \
  12.       -texture fish -colour {28 185 204} -above_ground 0.2
  13.  
  14. tux_load_texture shrub shrub.rgb 0
  15. tux_tree_props -name tree3 -diameter 1.4 -height 1.0 \
  16.       -texture shrub -colour {0 255 48} -polyhedron $tree_poly \
  17.       -size_varies 0.5 
  18.  
  19. tux_load_texture tree tree.rgb 0
  20. tux_tree_props -name tree1 -diameter 1.4 -height 2.5 \
  21.       -texture tree -colour {255 255 255} -polyhedron $tree_poly \
  22.       -size_varies 0.5 
  23.  
  24. tux_load_texture tree_barren tree_barren.rgb 0
  25. tux_tree_props -name tree2 -diameter 1.4 -height 2.5 \
  26.       -texture tree_barren -colour {255 96 0} -polyhedron $tree_poly \
  27.       -size_varies 0.5 
  28.  
  29. #tux_load_texture finish_f f.rgb 0
  30. #tux_tree_props -name tree4 -diameter 2.0 -height 2.0 \
  31. #      -texture finish_f -colour {255 0 253} -polyhedron $tree_poly \
  32. #      -size_varies 0.0 
  33.  
  34. #tux_load_texture finish_i i.rgb 0
  35. #tux_tree_props -name tree5 -diameter 2.0 -height 2.0 \
  36. #      -texture finish_i -colour {255 56 253} -polyhedron $tree_poly \
  37. #      -size_varies 0.0 
  38.  
  39. #tux_load_texture finish_n n.rgb 0
  40. #tux_tree_props -name tree6 -diameter 2.0 -height 2.0 \
  41. #      -texture finish_n -colour {255 93 252} -polyhedron $tree_poly \
  42. #      -size_varies 0.0 
  43.  
  44. #tux_load_texture finish_s s.rgb 0
  45. #tux_tree_props -name tree7 -diameter 2.0 -height 2.0 \
  46. #      -texture finish_s -colour {251 125 250} -polyhedron $tree_poly \
  47. #      -size_varies 0.0 
  48.  
  49. #tux_load_texture finish_h h.rgb 0
  50. #tux_tree_props -name tree8 -diameter 2.0 -height 2.0 \
  51. #      -texture finish_h -colour {252 161 251} -polyhedron $tree_poly \
  52. #      -size_varies 0.0
  53.  
  54. tux_load_texture flag1 flag.rgb 0
  55. tux_item_spec -name flag -diameter 1.0 -height 1.0 \
  56.       -texture flag1 -colour {194 40 40} -nocollision
  57.       
  58. tux_load_texture finish finish.rgb 0
  59. tux_item_spec -name finish -diameter 9.0 -height 6.0 \
  60.         -texture finish -colour {255 255 0} -nocollision \
  61.                 -normal {0 0 1}
  62.  
  63. tux_load_texture start start.rgb 0
  64. tux_item_spec -name start -diameter 9.0 -height 6.0 \
  65.         -texture start -colour {128 128 0} -nocollision \
  66.                 -normal {0 0 1}
  67.  
  68. tux_item_spec -name float -nocollision -colour {255 128 255} -reset_point
  69.  
  70. tux_trees "$cwd/trees.rgb"            ;# bitmap specifying tree locations
  71.  
  72. tux_ice_tex ice.rgb     ;# ice image
  73. tux_rock_tex rock.rgb   ;# rock image
  74. tux_snow_tex snow.rgb   ;# snow image
  75.  
  76. tux_friction 0.22 0.9 0.35     ;# ice, rock, snow friction coefficients
  77.  
  78. #
  79. # Introductory animation keyframe data
  80. #
  81. source tux_walk.tcl
  82.  
  83. #
  84. # Lighting
  85. #
  86. set conditions [tux_get_race_conditions]
  87. if { $conditions == "sunny" } {
  88.     source sunny_light.tcl
  89. } elseif { $conditions == "cloudy" } {
  90.     source foggy_light.tcl
  91. } elseif { $conditions == "night" } {
  92.     source night_light.tcl
  93.  
  94. cd $cwd
  95.